package com.kotei.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kotei.pojo.ObsCompare;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Collection;
import java.util.List;

@Mapper
public interface ObsCompareMapper extends BaseMapper<ObsCompare> {
    @Insert("insert into obs_compare(id,`module`,exist,file_size,msg,`time`,absolute_path,relative_path) VALUES (#{obj.id},#{obj.module},#{obj.exist},#{obj.file_size},#{obj.msg},now(),#{obj.absolute_path},#{obj.relative_path})")
    int insertObsCompare(@Param("obj") ObsCompare obsCompare);


    int insertObsCompareList(Collection<ObsCompare> collection);

    int updateObsCompareExistStatus(Collection<String> collection);


    @Select("select  * from obs_compare_cj where exist = 0")
    List<ObsCompare> getAllList();
}

